package com.atguigu.gmall.client;
/**
 * 降级接口
 */

import com.atguigu.gmall.client.impl.ActivityDegradeFeignClient;
import com.atguigu.gmall.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "service-activity",fallback = ActivityDegradeFeignClient.class,path = "/api/activity")
public interface ActivityFeignClient {
    /**
     * 查询Redis中当日秒杀商品列表
     * @return
     */
    @GetMapping("/inner/seckill/findAll")
    public Result getSeckillGoodsList();

    /**
     * 查询指定秒杀商品信息
     * @param skuId 商品id
     * @return 秒杀商品信息结果
     */
    @GetMapping("/inner/seckill/getSeckillGoods/{skuId}")
    public Result getSeckillGoods(@PathVariable("skuId") Long skuId);
}
